package game.examples.newEntityCreation;

import param.GameParam;
import game.Coordinate;
import game.Entity2D;
import graphic.Assets;

/**
 * Classe di esempio di come si implementa un nuovo mob.
 * @author Jan
 *
 */
public class ThreadBasedMob extends Entity2D{
	
	public ThreadBasedMob(int entityID, Coordinate coordinate, int shiftAmount) {
		super(entityID, coordinate, shiftAmount);
		setSprite( Assets.getsLoader().getSprite(Assets.SPRITE_MOB_2D) );
	}

	
	@Override
	public boolean perform() {
		if(getCoordinate().getY() < GameParam.GAME_HEIGHT - getSprite().getHeight()/2){
			getCoordinate().setY(getCoordinate().getY()+5);
			return false;
		}else{
			System.out.println("ID "+ getEntityID() +" say: why are you kill me TT^TT");
			return true;
		}
	}
	
	
}
